package com.sskj.api.task;

import com.sskj.api.service.ISRSService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class SRSTask {

    @Autowired
    private ISRSService srsService;

    @Scheduled(fixedDelay = 60000)
    public void destroyIdleStream() {
        log.info("清理闲置视频流资源---START");
        srsService.destroyIdleStream();
        log.info("清理闲置视频流资源---END");
    }
}
